<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>CmpName</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>
<body>

<h1>CmpName</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a href="index.html">service functions</a> |
<a href="../fsf/processname.html">FSF.ProcessName</a><br>
</div>

<div class=shortdescr>
  The <dfn>CmpName</dfn> function compares a null-terminated text string (for example, a file name) with a
  pattern (mask).
</div>

<pre class=syntax>
int WINAPI CmpName(
  const char *Pattern,
  const char *String,
  int SkipPath
);
</pre>

<h3>Parameters</h3>
<div class=descr>
  <div class=dfn>Pattern</div>
  <div class=dfndescr>Address of the pattern string.</div>
  <div class=dfn>String</div>
  <div class=dfndescr>Address of the null-terminated text string.</div>
  <div class=dfn>SkipPath</div>
  <div class=dfndescr>If TRUE, the file path in <dfn>String</dfn> is ignored and only the file name
    is used in comparison.</div>
</div>

<h3>Return value</h3>
<div class=descr>
  <code>TRUE</code> if the string matches the pattern, otherwise <code>FALSE</code>.
</div>

<h3>Remarks</h3>
<div class=descr>
  The <dfn>Pattern</dfn> parameter can contain any characters allowed in file names and the
  following special characters (wildcards):
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Wildcard</th><th class="cont" width="60%">Description</th></tr>
    <tr class="cont"><td class="cont" width="40%"><code>*</code></td>
    <td class="cont" width="60%">any number of characters</td></tr>
    <tr class="cont"><td class="cont" width="40%"><code>?</code></td>
    <td class="cont" width="60%">any single character</td></tr>
    <tr class="cont"><td class="cont" width="40%"><code>[c,x-z]</code></td>
    <td class="cont" width="60%">any character from the range specified in square brackets; both
      individual characters and character ranges can be specified.</td></tr>
</table>

  For example, files ftp.exe, fc.exe and f.ext will meet the following mask <code>f*.ex?</code>,
the mask <code>*co*</code> corresponds to color.ini and edit.com, the mask
<code>[c-ft]*.txt</code> corresponds to config.txt, demo.txt, faq.txt and tips.txt.</div>

</body>
</html>